customer = ['mwx','lwj','lhm','hwq','chx','tjf']

for index in range(len(customer) -2) :     # 循环至列表长度减2。
    poped_c = customer.pop()
    print('Sorry mr.' + poped_c + ', you can\'t have dinner here! Because you were\'t invited.')

for index in range(len(customer)) :
    print('Dear ' + customer[index] + ', you are still in the list. And don\'t forget to attend in time!')

for index in range(len(customer)) :
    # 此处不能为index,因为当循环一次之后列表只剩一个元素，所以下行值不能为[1]。
    del customer[0]
print(customer)